#+---------------------------------------------+
#| ProxyBot 0.7
#+---------------------------------------------+
#| Written by Alec Hussey
#| Copyright (C) 2008 MadSoft
#| Website: www.madsoft.org
#| License: GNU General Public License v3
#+---------------------------------------------+

import os, glob

"""
Define a list (aka array) using keyword __all__ that will
hold a list of all the availible plugins for Python to
reference later when we want to import all plugins at once
"""
__all__ = []

"""
Loop through every python file in the plugins directory
with the exception of __init__ (this file) and append it
to the list __all__
"""
for plugin in glob.glob(os.path.join("plugins", "[!__init__]*.py")):
	"""
	Parse the plugin's filename so that it only returns
	the filename without the extension (aka the module
	name) and append it to our list of plugins 
	"""
	__all__.append(plugin.split(os.sep)[1].split(".")[0])
